<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/base/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>${systemOption.systemTitle}</title>
    <%@ include file="/base/head.jsp"%>
    <script type="text/javascript" charset="UTF-8">
    
    
      //分页查询
	function doQuery(){
	  	var queryParams=$('#czjlBookList').datagrid('options').queryParams;
	  	queryParams.nameSch=$('#nameSch').val(); 	
	 	queryParams.ipaddrss=$('#ipaddrss').val();
	 	queryParams.operType= $('#operType').combobox('getValue');
	  	queryParams.fromDateSch=$('#fromDateSch').datebox('getValue');
	  	queryParams.toDateSch=$('#toDateSch').datebox('getValue');
	  	//重置当前页数为1
	  	resetDG('#czjlBookList');

	} 
	function formatType(val,row){
		var value ;
		if(val == 1){
		value = '<span style="color:green;">新增</span>';
		}
		else if(val == 2){
		value = '<span style="color:blue;">更新</span>';
		}		
		else if(val == 3){
		value = '<span style="color:red;">删除</span>';
		}
		return value;
	}
    </script>
  </head>
  
  <body>
        
<!-- 主窗口 -->  	 
    <table id="czjlBookList" class="easyui-datagrid" data-options="fit:true,
    								title:'操作记录',
    								iconCls:'icon-page',
    								rownumbers:true,
									striped:true,
									singleSelect:true,
									fitColumns:true,
									toolbar:'#tb',
									pagination:true,
									pageSize:20,
									pageList:[20,30,50,100],
									url:'${ctx}/json/listczjl.action'">
		<thead>
			<tr>
				<th data-options="field:'uname',align:'center',halign:'center'" width="150"><strong>用户名</strong></th>
				<th data-options="field:'ip',align:'center',halign:'center'" width="150"><strong>地址IP</strong></th>
				<th data-options="field:'opertype',align:'center',formatter:formatType" width="150"><strong>操作类型</strong></th>
				<th data-options="field:'operation',align:'left',halign:'center'" width="200" ><strong>操作描述</strong></th>
				<th data-options="field:'opertime',align:'center'," width="150" ><strong>操作时间</strong></th>
				<th data-options="field:'remark',align:'center'," width="200" ><strong>备注</strong></th>
			</tr>
		</thead>
		
	</table>
<!-- Datagrid工具栏 -->
<div id="tb">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
	   <td style="padding:2px">
						操作人：<input id="nameSch" class="easyui-textbox"> 
			&nbsp;&nbsp;IP地址：<input id="ipaddrss" class="easyui-textbox" > 
			&nbsp;&nbsp;操作类型：
	    						<select id="operType" class="easyui-combobox" style="width: 120px" data-options="editable:false">
	    							<option value="0">--全部--</option>
	    							<option value="1">新增</option>
	    							<option value="2">更新</option>
	    							<option value="3">删除</option> 
	    						</select>
			&nbsp;&nbsp;时间：<input id="fromDateSch" class="easyui-datebox" />至<input id="toDateSch" class="easyui-datebox"/>
			&nbsp;&nbsp;<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" 
			onclick="doQuery()">查询</a>
		</td>
	</tr>
	</table>
</div>    
  </body>
</html>
